CC = g++
PYLIB = -I/usr/include/python3.8

cBBox.so: cBBox.o py_wrapper.o
	$(CC) -O2 -Wall -shared -std=c++11 -fPIC $^ -o $@ $(PYLIB)

cBBox.o: cBBox.cpp cBBox.h
	$(CC) -c -Ofast -Wall -std=c++11 -fPIC $< -o $@ -lm $(PYLIB)

py_wrapper.o: py_wrapper.cpp cBBox.h
	$(CC) -c -O -Wall -std=c++11 -fPIC $< -o $@ $(PYLIB)

clean:
	rm *.o *.so
